package utils
{
	import flash.display.BitmapData;
	import flash.display.GradientType;
	import flash.display.Graphics;
	import flash.display.Shape;
	import flash.geom.Matrix;

	public class UIUtil
	{
		public static function drawSelect(w:int, h:int, color:uint):Shape
		{
			var shape:Shape = new Shape();
			var graphics:Graphics = shape.graphics;
			var matrix:Matrix = new Matrix();
			var t:int = 255/3;
			matrix.createGradientBox(w, h);
			graphics.clear();
			graphics.beginGradientFill(GradientType.LINEAR, 
				[color, color, color, color],
				[0, 0.5, 0.5, 0], 
				[0, t, 255 - t, 255], matrix);
			graphics.drawRect(0, 0, w, h);
			graphics.endFill();
			return shape;
		}
	}
}